home *** CD-ROM | disk | FTP | other *** search
/ Shareware Super Platinum 8 / Shareware Super Platinum 8.iso / mac / BACKUP / SYNC.ZIP;1 / SYNC.DOC next >
Encoding:
Text File  |  1993-09-17  |  7.5 KB  |  153 lines

  1. Getting the legal stuff out of the way first...
  2.  
  3. License:
  4.  
  5.     SYNC.EXE / SYNC.PRG  Copyright 1993 SofKinetics Inc.  All Rights Reserved.
  6.  
  7.     (1)   This program is free.
  8.  
  9.     (2)   You are free to use, copy and distribute SYNC.PRG and/or the 
  10.           compiled SYNC.EXE providing:
  11.  
  12.           (a)  No fee is charged for use, copying or distribution.
  13.  
  14.           (b)  You distribute the source file with original copyright
  15.                and annotate any and all changes you make.
  16.  
  17.  
  18.     SofKinetics, Inc.
  19.     Stone Mountain,  GA  30088-2125
  20.     (404) 578-7148
  21.  
  22.  
  23. Disclaimer:
  24.  
  25.     SofKinetics hereby disclaims all warranties relating to this
  26.     software, whether express or implied, including without
  27.     limitation any implied warranties of merchantability or fitness
  28.     for a particular purpose.
  29.     
  30.     SofKinetics will not be liable for any special, incidental, 
  31.     consequential, indirect or similar damages due to loss of data 
  32.     or any other reason, even if SofKinetics or an agent of SofKinetics
  33.     has been advised of the possibility of such damages.
  34.     
  35.     The person using the software bears all risk as to the quality and 
  36.     performance of the software.
  37.  
  38. ******************************************************************************
  39.  
  40. Why SYNC?
  41.  
  42.      SYNC is one of those utilities that might have never been written had it
  43.      not been for a unique need.  That need, to maintain a "master" directory
  44.      of distribution files (the target) and update the target directory as
  45.      changes were made to files in source directories.  Once updated, the 
  46.      target directory may serve as the source for another subordinate filing
  47.      directory, the shadow.  The scenario runs something like this:
  48.  
  49.      I have a master directory of Window drivers, .GRPs, and .INIs on my hard
  50.      disk.  These are the ones I distribute to users.  Some users run the win
  51.      apps from the network, others from the local HD since they have portable
  52.      PCs and docking stations.  I have the responsibility to keep the LAN and
  53.      the user's directories synchronized but I do not have "total" control
  54.      over all the network resources.  Sometimes, others with privy will change
  55.      a driver and fail to tell anyone!!! Sometimes, just installing software
  56.      will do the same thing.
  57.  
  58.      SYNC will scan source files in a specified directory against a set of
  59.      target files.  The file specification may be explicit as in the case of
  60.      SYSTEM.INI or may be specified using DOS wildcards as in the case of
  61.      *.DRV.  The source directory may be specified as S:\USERS\WIN or as
  62.      S:\USERS\WIN and the target directory is specified in a similar manner.
  63.      A file specification causes an update condition when the filename in the
  64.      source directory (1) cannot be located in the target directory or when
  65.      the specified source file is more current than the file in the target 
  66.      directory (based upon the time/date stamp.)
  67.  
  68.      If the TARGET file requires updating, any directory specifications made
  69.      inf the SHADOW directory will also be updated.  The shadow directory may
  70.      be useful for accumulating the files from multiple target updates and
  71.      then creating one update set for the user community.  For example:
  72.  
  73.      FILENAME  SOURCE_DIR          TARGET_DIR          SHADOW_DIR
  74.      --------  ------------------- ------------------- ---------------------
  75.      *.INI     G:\WINUSERS         C:\SUPPORT\WIN      C:\SUPPORT\WIN\UPDATE
  76.      *.DRV     G:\WINUSERS\SYSTEM  C:\SUPPORT\WIN\SYS  C:\SUPPORT\WIN\UPDATE
  77.      *.*       S:\SYSTEM\NOVELL    C:\PROTOCOL\SHELL   C:\SUPPORT\NETWORK
  78.  
  79.      NOTE: If the TARGET and SHADOW directories are on a virtural drive,
  80.            The source code should be modified where annotated to remove any
  81.            references to file() IF THE SOURCE DIRECTORY IS LOCAL AND THE
  82.            POSSIBILITY EXISTS FOR PROCESSING SYNC WHEN THE VIRTURAL DRIVE
  83.            IS NOT ATTACHED/MAPPED.  These changes will remove SYNC's feature
  84.            of creating the target path using DOS MkDir.
  85.  
  86.      Other uses of sync may be to maintain synchronization of source code 
  87.      directories on the development PC.  For example, I typically have two
  88.      directories dedicated to a client when I am writing software; one for
  89.      the version I am presently working and one for the static or previous
  90.      version of the same software.  In some situations, I have a third (and/
  91.      or fourth that is an intermediate directory containing files that have
  92.      been modified and tested.  For example:
  93.  
  94.      C:\SOURCE\XYZ\NEWJOB          (I make changes and test here)
  95.      C:\SOURCE\XYZ\WORKS           (Tested changes are moved here)
  96.      C:\SOURCE\XYZ\BETA            (Client is testing this version)
  97.      C:\SOURCE\XYZ\CURVER          (Client is running this production)
  98.  
  99.      SYNC can manage the above scenario by creating a batch file which
  100.      can synchronize changes between NEWJOB, WORKS, and BETA.  Of course,
  101.      I generally do a backup before processing the batch file.
  102.  
  103.  
  104. ******************************************************************************
  105.  
  106.      To process SYNC: 
  107.      
  108.      First compile under CLIPPER 5.2 (b or c):
  109.           clipper SYNC /N /L
  110.      and link using whichever linker you use...
  111.           rtlink fi SYNC
  112.  
  113.      To execute, copy SYNC.EXE into a directory in your DOS path (or search
  114.      path if on a network) and then type SYNC and press ENTER.  The program
  115.      will announce that the dictionary pointer (really the file sync.mem) is
  116.      not located on drive C: root directory.  Upon pressing ENTER, you must
  117.      specify the full path to the SYNC database, SYNC.DBF, which HAS NOT yet
  118.      been created.  Generally, this may look something like the following:
  119.           C:\UTIL\SYNCHRO\SYNC.DBF                          Press ENTER.
  120.  
  121.      Note: You may specify another name for the database other than SYNC.DBF
  122.  
  123.      The prompt "Create the database structure..." will appear.  Select YES
  124.      and then respond with YES again to edit the sync database.
  125.  
  126.      Supply a FILENAME, a SOURCE_DIR, and a TARGET_DIR as required fields. The
  127.      fields SHADOW_DIR and INTERACT are optional.  We already talked about the
  128.      shadow directory and if INTERACT is set ( not recommended ) the operator
  129.      will be required to "yea" and "nay" each file that requires updating. The
  130.      fields LASTDATE and LASTTIME are written to by the program and reflect
  131.      the last time that the UPDATE.BAT file was processed with the associated
  132.      file(s) updated.  It DOES NOT indicate the real time of update since the
  133.      program never knows if the batch file is actually processed.
  134.  
  135.      After editing all required fields, press ESC to close the edit session
  136.      and SYNC will begin processing.  If any updates are required, a batch
  137.      file UPDATE.BAT (default) will be created.  If all files are in sync, 
  138.      then the UPDATE.BAT file WILL NOT be written.  Therefore, always erase
  139.      the batch file prior to running SYNC and test to see if it exists.  If it
  140.      exists, then call the file to do the actual copy work.
  141.  
  142. ******************************************************************************
  143.  
  144.      There is little glamour is utilities and just posting one written in
  145.      Clipper will probably open up untold threads relating to better ways and
  146.      the proverbial rewrite in "C", but that's OK 'cause it all in fun and
  147.      real programmers have thick skin and cry in private.  Have at it, and
  148.      have fun.
  149.  
  150.      Mickey Burnette
  151.      SofKinetics, Inc.
  152.  
  153.